package net.message {

	import flash.utils.IDataInput;
	import net.MessageType;
	import net.handler.GC_Hero_LevelUpHandler;
	import util.Long;
	
	/**
	 * 文件名：GC_Hero_LevelUpMessage.as
	 * <p>
	 * 功能：武将升级
	 * <p>
	 * 版本：1.0.0
	 * <p>
	 * 作者：Builderd by AppTools
	 * <p>
	 */
	public class GC_Hero_LevelUpMessage extends BaseMessage {
	
	//写入操作结果反馈：1：成功，0：无此武将或升级限制，-1：通货不足
		public var feedback:int;
	//写入武将key
		public var heroId:Long;
	//写入武将模板code
		public var heroCode:uint;
	//写入武将级别
		public var lv:uint;
	//写入武将资质
		public var trait:uint;
	//写入已确定的刷出来的智力
		public var winsdomAppend:uint;
	//写入已确定的刷出来的基础
		public var strengthAppend:uint;
	//写入已确定的刷出来的基础
		public var luckyAppend:uint;


		public function GC_Hero_LevelUpMessage() {
			super();
			type = MessageType.GC_Hero_LevelUp;
			handler = new GC_Hero_LevelUpHandler();
		}
	
		override public function readMessage(data:IDataInput):void {
			//写入操作结果反馈：1：成功，0：无此武将或升级限制，-1：通货不足
			feedback = data.readInt();
			//写入武将key
			heroId = data.readLong();
			//写入武将模板code
			heroCode = data.readShort();
			//写入武将级别
			lv = data.readShort();
			//写入武将资质
			trait = data.readShort();
			//写入已确定的刷出来的智力
			winsdomAppend = data.readShort();
			//写入已确定的刷出来的基础
			strengthAppend = data.readShort();
			//写入已确定的刷出来的基础
			luckyAppend = data.readShort();
		}
	}
}
